﻿using Bot.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bot.Domain.BotImport
{
    public class BotUpgradeDataQueue
    {
        public EnumProcessState ProcessState { get; set; }
        public EnumImportHandleStatus Status { get; set; }
        public string FileName { get; set; }
        public List<UpgradeIntentAggregate> UpgradeIntentAggregateList { get; set; }
        public List<UpgradeEntityAggregate> UpgradeEntityAggregateList { get; set; }
        public List<IntentQuestionEntitiesDto> IntentQuestionEntitiesDtoList { get; set; }
        public string Json { get; set; }
        public Queue<dynamic> UpgradeDataQueue { get; set; }
        public int SiteId { get; set; }
        public Guid BotId { get; set; }
        public string BotName { get; set; }
        public decimal VersionId { get; set; }
        public string AppId { get; set; }
        public IList<string> ErrorMessages { get; set; }
        public string OperationName { get; set; }
        public int ProcessId { get; set; }
        public string FailedPath { get; set; }
        /// <summary>
        /// 升级类型 1 企业 2 测试
        /// </summary>
        public int UpgradeType { get; set; }

        public BotUpgradeDataQueue()
        {
            UpgradeDataQueue = new Queue<dynamic>();
            Status = EnumImportHandleStatus.Wait;
            ProcessState = EnumProcessState.Occupy;
            ErrorMessages = new List<string>();
            UpgradeIntentAggregateList = new List<UpgradeIntentAggregate>();
            UpgradeEntityAggregateList = new List<UpgradeEntityAggregate>();
            IntentQuestionEntitiesDtoList = new List<IntentQuestionEntitiesDto>();
        }
        public BotUpgradeDataQueue(BotUpgradeDataQueue botUpgradeDataQueue)
        {
            this.ProcessState = botUpgradeDataQueue.ProcessState;
            this.Status = botUpgradeDataQueue.Status;
            this.FileName = botUpgradeDataQueue.FileName;
            this.UpgradeIntentAggregateList = botUpgradeDataQueue.UpgradeIntentAggregateList;
            this.UpgradeEntityAggregateList = botUpgradeDataQueue.UpgradeEntityAggregateList;
            this.IntentQuestionEntitiesDtoList = botUpgradeDataQueue.IntentQuestionEntitiesDtoList;
            this.Json = botUpgradeDataQueue.Json;
            this.UpgradeDataQueue = botUpgradeDataQueue.UpgradeDataQueue;
            this.SiteId = botUpgradeDataQueue.SiteId;
            this.BotId = botUpgradeDataQueue.BotId;
            this.BotName = botUpgradeDataQueue.BotName;
            this.VersionId = botUpgradeDataQueue.VersionId;
            this.AppId = botUpgradeDataQueue.AppId;
            this.ErrorMessages = botUpgradeDataQueue.ErrorMessages;
            this.OperationName = botUpgradeDataQueue.OperationName;
            this.ProcessId = botUpgradeDataQueue.ProcessId;
            this.FailedPath = botUpgradeDataQueue.FailedPath;
            this.UpgradeType= botUpgradeDataQueue.UpgradeType;
        }
    }
}
